import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Main {
    public static void main(String[] args) {
        JFrame frame = new JFrame("刘玮丰");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(800, 600);
        JPanel panel = new JPanel();
        panel.setLayout(null);
        JButton button =new JButton("移动");
        button.setBounds(20, 20, 100, 100);
        button.addActionListener(new ActionListener() {
           @Override
            public void actionPerformed(ActionEvent e) {
               button.setBounds(200, 20, 100, 100);

           }
        });
        panel.add(button);
        frame.add(panel);
        frame.setVisible(true);
        frame.setLocationRelativeTo(null);

    }
}